home *** CD-ROM | disk | FTP | other *** search
/ Blender Volume 1 #1 / Blender_1_1.iso / BLENDER / FILES / SHARED.DIR / 00400_MOVIE SCRIPT.ls next >
Encoding:
Text File  |  1994-11-01  |  4.5 KB  |  181 lines

  1. on startMovie
  2.   global i, j, k, n, o, volume, PLAYRATE
  3.   set i to 0
  4.   set PLAYRATE to 1.0
  5.   set the exitLock to 1
  6.   SETSPEAKER()
  7.   if the machineType = 256 then
  8.     nothing()
  9.   else
  10.     openXLib("BLENDER1:FILES:RW.XOj")
  11.     nothing()
  12.   end if
  13. end
  14.  
  15. on initRearWindow theColor
  16.   global rwObj
  17.   if the machineType = 256 then
  18.     nothing()
  19.   else
  20.     if objectp(rwObj) then
  21.       rwObj(mdispose)
  22.     end if
  23.     set rwObj to RearWindow(mnew, "M")
  24.     rwObj(mIndexColorToWindow, theColor)
  25.   end if
  26. end
  27.  
  28. on disposeRearWindow
  29.   global rwObj
  30.   if the machineType = 256 then
  31.     nothing()
  32.   else
  33.     if objectp(rwObj) then
  34.       rwObj(mdispose)
  35.     end if
  36.   end if
  37. end
  38.  
  39. on enterFrame
  40.   global i, j, k
  41.   set i to i + 1
  42.   set j to i mod 4
  43.   set k to i mod 2
  44.   set the castNum of sprite 33 to the number of cast (453 + j)
  45.   set the castNum of sprite 34 to the number of cast (421 + k)
  46.   puppetSprite(35, 1)
  47.   set the castNum of sprite 36 to the number of cast (425 + k)
  48.   set the castNum of sprite 37 to the number of cast (401 + j)
  49.   set the castNum of sprite 38 to the number of cast (409 + j)
  50.   set the castNum of sprite 39 to the number of cast (405 + j)
  51.   set the castNum of sprite 40 to the number of cast (413 + j)
  52.   set the castNum of sprite 41 to the number of cast (427 + k)
  53.   set the castNum of sprite 42 to the number of cast (427 + k)
  54.   set the castNum of sprite 43 to the number of cast (427 + k)
  55.   if the castNum of sprite 44 = 427 then
  56.     set the castNum of sprite 44 to the number of cast 429
  57.   else
  58.     set the castNum of sprite 44 to the number of cast 427
  59.   end if
  60.   set the castNum of sprite 45 to the number of cast (431 + k)
  61.   updateStage()
  62.   if (the timeoutLapsed / 60) > 720 then
  63.     beginCONTROL()
  64.   end if
  65.   set the keyDownScript to "checkKey"
  66. end
  67.  
  68. on SPEAK
  69.   set the movieRate of sprite 31 to 1.0
  70. end
  71.  
  72. on checkKey
  73.   set exit to 0
  74.   if the commandDown and (the key = "q") then
  75.     set exit to 1
  76.     endMOVIE()
  77.   end if
  78.   if the commandDown and (the key = ".") then
  79.     set exit to 1
  80.     endMOVIE()
  81.   end if
  82.   if (exit = 0) and not objectp(CONTROLWINDOW) then
  83.     wrongKEY()
  84.   end if
  85. end
  86.  
  87. on beginCONTROL
  88.   global CONTROLWINDOW
  89.   set the timeoutLapsed to 0
  90.   if objectp(CONTROLWINDOW) then
  91.     forget(CONTROLWINDOW)
  92.   end if
  93.   set horzOrigin to the stageLeft + 240
  94.   set vertOrigin to the stageTop + 160
  95.   set CONTROLWINDOWrect to rect(horzOrigin, vertOrigin, horzOrigin + 240, vertOrigin + 160)
  96.   set CONTROLWINDOW to window "CONTROL"
  97.   set the rect of CONTROLWINDOW to CONTROLWINDOWrect
  98.   set the fileName of CONTROLWINDOW to "CONTROL.DIR"
  99.   set the titleVisible of CONTROLWINDOW to 0
  100.   set the modal of window "CONTROL.DIR" to 1
  101.   open(CONTROLWINDOW)
  102. end
  103.  
  104. on beginOPEN
  105.   nothing()
  106. end
  107.  
  108. on endMOVIE
  109.   global CONTROLWINDOW
  110.   if objectp(CONTROLWINDOW) then
  111.     forget(CONTROLWINDOW)
  112.   end if
  113.   set horzOrigin to the stageLeft + 200
  114.   set vertOrigin to the stageTop + 150
  115.   set CONTROLWINDOWrect to rect(horzOrigin, vertOrigin, horzOrigin + 240, vertOrigin + 160)
  116.   set CONTROLWINDOW to window "CONTROL"
  117.   set the rect of CONTROLWINDOW to CONTROLWINDOWrect
  118.   set the fileName of CONTROLWINDOW to "endWIND.DIR"
  119.   set the titleVisible of CONTROLWINDOW to 0
  120.   set the modal of window "endWIND.DIR" to 1
  121.   open(CONTROLWINDOW)
  122. end
  123.  
  124. on wrongKEY
  125.   global CONTROLWINDOW
  126.   if objectp(CONTROLWINDOW) then
  127.     forget(CONTROLWINDOW)
  128.   end if
  129.   set horzOrigin to the stageLeft + 240
  130.   set vertOrigin to the stageTop + 160
  131.   set CONTROLWINDOWrect to rect(horzOrigin, vertOrigin, horzOrigin + 240, vertOrigin + 160)
  132.   set CONTROLWINDOW to window "CONTROL"
  133.   set the rect of CONTROLWINDOW to CONTROLWINDOWrect
  134.   set the fileName of CONTROLWINDOW to "wrongKEY.DIR"
  135.   set the titleVisible of CONTROLWINDOW to 0
  136.   set the modal of window "wrongKEY.DIR" to 1
  137.   open(CONTROLWINDOW)
  138. end
  139.  
  140. on stopMovie
  141.   finishMovie()
  142. end
  143.  
  144. on finishMovie
  145.   global CONTROLWINDOW
  146.   set the modal of window "CONTROL.DIR" to 0
  147.   set the modal of window "wrongKEY.DIR" to 0
  148.   set the modal of window "endWIND.DIR" to 0
  149.   if objectp(CONTROLWINDOW) then
  150.     forget(CONTROLWINDOW)
  151.   end if
  152. end
  153.  
  154. on SETSPEAKER
  155.   global volume
  156.   if volume = 0 then
  157.     puppetSprite(35, 1)
  158.     set the castNum of sprite 35 to 417
  159.     set the soundLevel to 0
  160.     updateStage()
  161.   end if
  162.   if volume = 1 then
  163.     puppetSprite(35, 1)
  164.     set the castNum of sprite 35 to 418
  165.     set the soundLevel to 2
  166.     updateStage()
  167.   end if
  168.   if volume = 2 then
  169.     puppetSprite(35, 1)
  170.     set the castNum of sprite 35 to 419
  171.     set the soundLevel to 5
  172.     updateStage()
  173.   end if
  174.   if volume = 3 then
  175.     puppetSprite(35, 1)
  176.     set the castNum of sprite 35 to 420
  177.     set the soundLevel to 7
  178.     updateStage()
  179.   end if
  180. end
  181.